package com.wollo.student.mapper;

import com.wollo.domain.Check;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckMapper {
    //查询签到信息
    //新增签到信息
    @Insert("insert into t_check values(default,#{uid},#{checkDate},#{checkTime},#{checkStatus},#{checkResult},#{remark})")
    int insertUserCheckInfoMapper(Check check);
    //根据用户Id和签到日期和签到状态查询签到信息
    @Select("select * from t_check where uid=#{uid} and checkdate=#{checkDate} and checkstatus=#{checkStatus}")
    Check selectUserCheckInfoMapper(Check check);
    //动态分页查询指定用户的签到信息
    List<Check> selectUserCheckInfoMapperList(@Param("uid") Integer uid, @Param("checkDate") String checkDate);
}
